#set(SOURCES test_thread.cc ../thread/ring_queue_buffer_single.cc ../thread/thread.cc ../base/logging.cc ../base/byte_buffer_dynamic.cc)

set(TEST_DIR ${PROJECT_SOURCE_DIR}/src/test)
exec_program(protoc ARGS "--proto_path=${TEST_DIR} --cpp_out=${TEST_DIR} ${TEST_DIR}/data_element.proto")

set(TEST_THREAD_SOURCES test_thread.cc)
set(TEST_RING_QUEUE_SINGLE_MODEL_BOUNDLESS test_ring_queue_single_model_boundless.cc)
set(TEST_RING_QUEUE_MOLTIPLE_MODEL_BOUNDLESS test_ring_queue_multiple_model_boundless.cc data_element.pb.cc)

if(COMMAND cmake_policy)
  cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)

#Build test_thread
add_executable(test_thread ${TEST_THREAD_SOURCES})
target_link_libraries(test_thread pthread rt ${PROJECT_BINARY_DIR}/lib/libamz.so)

#Build test_ring_queue_single_model_boundless
add_executable(test_ring_queue_single_model_boundless ${TEST_RING_QUEUE_SINGLE_MODEL_BOUNDLESS})
target_link_libraries(test_ring_queue_single_model_boundless pthread rt ${PROJECT_BINARY_DIR}/lib/libamz.so)

#Build test_ring_queue_multiple_model_boundless
add_executable(test_ring_queue_multiple_model_boundless ${TEST_RING_QUEUE_MOLTIPLE_MODEL_BOUNDLESS})
target_link_libraries(test_ring_queue_multiple_model_boundless pthread rt protobuf ${PROJECT_BINARY_DIR}/lib/libamz.so)
